package com.qixin.util.MybatisPlus;

import java.sql.Connection;
import java.sql.DriverManager;

public class JDBCUtil {
    public static String DRIVER="com.mysql.jdbc.Driver";


    private static Connection connection=null;

    /**
     * @return
     */
    public  static Connection getConnection(){
        try {
            Class.forName(DRIVER);
            
            connection= DriverManager.getConnection(MyGenerator.URL,MyGenerator.USERNAME,MyGenerator.PASSWORD);
            System.err.println("成功");
            return connection;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
 
}

